﻿using MvcApplication.Entity;
using System.Data.Entity.ModelConfiguration;

namespace MvcApplication.Data.Mapping
{
    public class DisplayInfo_Mapping : EntityTypeConfiguration<DisplayInfo>
    {
        public DisplayInfo_Mapping()
        {
            this.HasKey(t => t.ID);
            this.ToTable("DisplayInfo");

            this.HasOptional(t => t.Post).WithMany().HasForeignKey(t => t.PostID);
        }
    }
}
